#include "info_enter_manager.h"

InfoEnterManager::InfoEnterManager(int carCount) {
    _carCount = carCount;
}

void InfoEnterManager::enterInfo() {

    for (size_t i = 1; i < _carCount + 1; i++) {
        SmartCar sCar;
        //TODO:输入内容补充
        cout << "请输入第" << i << "个小车的信息：" << endl;
        cout << "\t请输入小车的ID(cqusn打头的16位数字+字母):";
        string id;
        cin >> id;
        sCar.setID(id);
        cout << "\t请输入小车的底盘编号(dp打头的8位数字+字母):";
        string chasisId;
        cin >> chasisId;
        sCar.chasis.setChasisId(chasisId);
        _cars.push_back(sCar);
    }

    for (size_t i = 1; i < _carCount + 1; i++) {
        Student stu;
        //TODO:输入学生的信息
        cout << "请输入第" << i << "个学生的学号(请输入6位字母):";
        string stuId;
        cin >> stuId;
        stu.stuId = stuId;
        cout << "请输入第" << i << "个学生的姓名:";
        string stuName;
        cin >> stuName;
        stu.stuName = stuName;
        _stus.push_back(stu);
    }
}

vector<SmartCar>& InfoEnterManager::getSmartCars() {
    return this->_cars;
}

vector<Student>& InfoEnterManager::getStudents() {
    return this->_stus;
}
